<?php
require_once("php/config.php");
require_once("php/database.php");

function main() {
	global $cmd;
	$cmd = explode(".", $_POST["cmd"]);
	
	if( count($cmd) < 2 ) return "syntax error"; // Invalid command
	
	switch ($cmd[0]) {
		case "show": return include("php/show.php");
	}
	
	return "no handler found for command";
}
echo main();
?>